#include "ManualCalibViewItemDelegate.h"
#include "GlobalApi/GlobalManage.h"


ManualCalibViewItemDelegate::ManualCalibViewItemDelegate(QObject *parent)
{

}

ManualCalibViewItemDelegate::~ManualCalibViewItemDelegate()
{


}

void ManualCalibViewItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
{
    QLineEdit *lineedit = static_cast<QLineEdit*>(editor);
    QString value = lineedit->text();

    if(lineedit->text() != tr(""))
    {
        GlobalManage::instance()->FormatStringWithTwoDecimal(&value);
    }

    model->setData(index, value, Qt::EditRole);
}

